home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5247 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  727 b 

  1. Path: qualcomm.com!usenet
  2. From: nabbasi@qualcomm.com (Nasser Abbasi)
  3. Newsgroups: comp.lang.c++
  4. Subject: generic paramter to template question
  5. Date: 3 Feb 1996 03:57:06 GMT
  6. Organization: QUALCOMM
  7. Message-ID: <4eumei$j82@qualcomm.com>
  8. NNTP-Posting-Host: nabbasi.qualcomm.com
  9. Mime-Version: 1.0
  10. X-Newsreader: WinVN 0.93.14
  11.  
  12. hi,
  13.  
  14. How can one give a template a parameter that is a value of generic type?
  15.  
  16. A template can take as paramter as a type, and also it can take a 
  17. parameter that is a variable of known type as in:
  18.  
  19. template<class T,int item> class foo{..}
  20.  
  21. but in the above the type of "item" is not generic. is there a way 
  22. to pass "item" above but let the user have its type as generic also (as 
  23. with T) ? 
  24.  
  25. thanks
  26. Nasser
  27.  
  28.